package ControlLayer;
import DBLayer.*;
import ModelLayer.*;

import java.util.ArrayList;

public class CustomerCtr {
	private static CustomerCtr instance;
	private Customer cus;
	private IFDBCustomer ifso;
	
	private CustomerCtr()
	{
		ifso = new DBCustomer();
	}
	public static CustomerCtr getInstance()
	{
		if(instance == null)
		{
			instance = new CustomerCtr();
		}
		return instance;
	}
	public int createCustomer(String Name, String Address,int ZipCode, String City, int PhoneNo, int CustomerId, String CustomerType)
	{
		Customer cus = new Customer(Name, Address, ZipCode, City, PhoneNo, CustomerId, CustomerType);
		return ifso.insertCustomer(cus, false);
	}
	public Customer findCustomer(int CustomerId)
    {
        return ifso.findCustomer(CustomerId, false);
    }
		
	public int deleteCustomer(int CustomerId)
    {
        return ifso.deleteCustomer(CustomerId);
    }
		
}
